#ifndef AIGAME_H
#define AIGAME_H

#include <QMainWindow>
#include "gamestart.h"
#include <QPainter>
#include <QPushButton>
#include <QDebug>
#include <QMouseEvent>
#include <QMessageBox>
#include <QWebSocket>
#include <QWebSocketServer>
class AIgame : public QMainWindow
{
    Q_OBJECT
public:
    explicit AIgame(QWidget *parent = nullptr);
    Gamestart* games=NULL;
    void paintEvent(QPaintEvent *);
    virtual void mousePressEvent(QMouseEvent *event);
    int x;
    int y;
    void AI_chess();
    void get_score(int x0,int y0);
    bool winorn(int i,int j);
    QWebSocket* socket;
    QWebSocketServer *server;
    void onNewConnection();

signals:
    void game_back();
    void sendMessage(const QString &text);

public slots:
};

#endif // AIGAME_H
